Component({
  options: {
    addGlobalClass: true,
  },
  properties: {
    value: {
      type: String,
    },
    placeholder: {
      type: String,
      value: '搜索你想要的内容',
    },
    disabled: {
      type: Boolean,
      value: false,
    }
  },
  methods: {
    doFocus(e) {
      this.triggerEvent('focus', { value: e.detail.value })
    },
    doChange(e) {
      this.triggerEvent('change', { value: e.detail.value })
    },
    doBlur(e) {
      this.triggerEvent('blur', { value: e.detail.value })
    },
    doCancel(e) {
      this.triggerEvent('cancel')
    },
    doConfirm(e) {
      this.triggerEvent('confirm', { value: e.detail.value })
    },
    doTap(e) {
      this.triggerEvent('click', { value: e.detail.value })
    }
  },
})
